package com.homesoft.runtime.metadata.modle;

import com.homesoft.runtime.metadata.engine.IMetadataEngine;
import com.thoughtworks.xstream.annotations.XStreamOmitField;


public abstract class AbstractRootMetadataObject extends AbstractMetadataObject implements IRootMetadataObject,IMetadataEngineAware {
	@XStreamOmitField 
	private IMetadataEngine engine;
     private String namespace;
     private String sysVersion;
	@Override
	public IMetadataEngine getEngine() {
		return this.engine;
	}
	@Override
	public void setEngine(IMetadataEngine engine) {
		this.engine = engine;
	}
	@Override
	public String getNamespace() {
		
		return this.namespace;
	}
	@Override
	public void setNamespace(String namespace) {
		this.namespace = namespace;
	}
	@Override
	public String getSysVersion() {
		// TODO Auto-generated method stub
		return this.sysVersion;
	}
	@Override
	public void setSysVersion(String sysVersion) {
		this.sysVersion = sysVersion;
	}
	@Override
	public abstract RootObjectType getObjectType();
	@Override
	public String getFullName() {
		 String ns = this.getNamespace();
         String n = this.getName();
         if (ns == null || ns.length() == 0)
         {
             return n;
         }
         return ns + "." + n;
	}
	@Override
	public boolean getDesignMode() {
		return true;//hg_TODO:  engine == null || engine.isDesignMode(); 
	}
	@Override
     public String getObjectPath(){
    	 return MetadataPath.MetadataPathSeparator;
     }
}
